package com.novel.mapper;

import com.novel.pojo.novel.NovelCategory;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

public interface NovelCategoryMapper extends Mapper<NovelCategory>, MySqlMapper<NovelCategory> {

    /**
     * 给书籍设置分类信息
     *
     * @param nId 书籍id
     * @param cId 类型id
     */
    int setNovelCategory(@Param("nid") String nId, @Param("cid") String cId);

    /**
     * 根据小说id查询小说分类信息
     *
     * @param novelId 小说id
     */
    String findCategoryNameByNovelId(String novelId);

    /**
     * 删除小说信息和类型之间的关系
     */
    int deleteNovelCategoryByNovelId(String novelId);
}
